package ${package}.${rootArtifactId}.common.model;


import java.util.List;

/**
 * @date 2019/4/1
 * @since 1.0
 */
public class PageInfoResult<T>{

    public static final int DEFAULT_PAGE_SIZE = 10;
    private List<T> list;
    private Long total;
    private Integer pageNo = Integer.valueOf(1);
    private Integer pageSize = Integer.valueOf(10);

    public PageInfoResult() {
    }

    public PageInfoResult(List<T> list, Long total, Integer current) {
        this.list = list;
        this.total = total;
        this.pageNo = current;
    }

    public PageInfoResult(Integer pageSize, Integer current) {
        this.pageSize = pageSize;
        this.pageNo = current;
    }

    public PageInfoResult(List<T> list, Long total, Integer current, Integer pageSize) {
        this.list = list;
        this.total = total;
        this.pageNo = current;
        this.pageSize = pageSize;
    }

    public List<T> getList() {
        return this.list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public Long getTotal() {
        return this.total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Integer getCurrent() {
        return this.pageNo;
    }

    public void setCurrent(Integer current) {
        this.pageNo = current;
    }

    public Integer getPageSize() {
        return this.pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

}
